//ACCEPTED
#include <cstdio>
int c[1000000], n, i, j, a=0, b=0, x=0, y=0;
void read(){
	scanf("%d", &n);
	for(i=0;i<n;i++)scanf("%d", &c[i]);
}
void process(){
	for(i=0, j=n-1;i<=j;){
		if(b<a){
			b+=c[j--];
			y++;
		}
		else{
			a+=c[i++];
			x++;
		}
	}
	printf("%d %d", x, y);
}
int main(){
	//freopen("in.txt","r",stdin);freopen("out.txt","w",stdout);
	read();
	process();
	return 0;
}
